<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>居中</title>
    <style>
        * {
            box-sizing: border-box;
        }

        .big{
            height: 500px;
            width: 500px;
            border: 1px solid red;
            padding: 150px;
        }

        .small {
            height: 200px;
            width: 200px;
            border: 1px solid green;
            /*内边距*/
        }
    </style>
</head>
<body>
    <div class="big">
        <div class="small">小</div>
    </div>
    <p>1111</p>
</body>
</html>